class ListNode {
  val: number
  next: ListNode | null
  constructor(val?: number, next?: ListNode | null) {
    this.val = (val === undefined ? 0 : val)
    this.next = (next === undefined ? null : next)
  }
}
export function loopList(headA:ListNode | null){
  while(headA != null) {
    console.log(headA.val)
    headA = headA.next
  }
}
export default ListNode
let a1 = new ListNode(11)
let a2 = new ListNode(12)
let a3 = new ListNode(13)
let a4 = new ListNode(14)

let common1 = new ListNode(91)
let common2 = new ListNode(92)

let b1 = new ListNode(21)
let b2 = new ListNode(22)

//组装
a1.next = a2
a2.next = a3
a3.next = a4
a4.next = common1
common1.next = common2

b1.next = b2
b2.next = common1

let c1 = new ListNode(1)
let c2 = new ListNode(2)
let c3 = new ListNode(3)
let c4 = new ListNode(2)
let c5 = new ListNode(1)

c1.next = c2
c2.next = c3
c3.next = c4
c4.next = c5

let d1 = new ListNode(1)
let d2 = new ListNode(2)
let d3 = new ListNode(3)
let d4 = new ListNode(2)
let d5 = new ListNode(4)

d1.next = d2
d2.next = d3
d3.next = d4
d4.next = d5
// d5.next = d3

let e11 = new ListNode(7)
let e12 = new ListNode(9)
let e13 = new ListNode(12)
let e14 = new ListNode(15)

e11.next = e12
e12.next = e13
e13.next = e14

let e21 = new ListNode(6)
let e22 = new ListNode(10)
let e23 = new ListNode(14)
e21.next = e22
e22.next = e23



export {a1,b1,c1,d1,e11,e21}

